<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@taglib
	uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
	uri="http://richfaces.org/rich" prefix="rich"%><%@taglib
	uri="https://ajax4jsf.dev.java.net/ajax" prefix="ajax"%><%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<div class="mainBackground">
	<div class="innerBackground">
<f:view locale="#{visitInfo.currentUser.locale}">
	<f:loadBundle basename="resources.VisionClickResources" var="msg"/>
	<jsp:include page="nav.jsp"/>
		<div class="table" style="width:960px;">
			<div class="tableHead" style="width:960px;"><h:outputText value="#{visitInfo.currentUserStory.userStoryName}"></h:outputText></div>
			<h:panelGrid columns="2" style="width:960px;">
				<h:outputText value="创建者"></h:outputText>
				<h:outputText value="#{visitInfo.currentUserStory.creator}">
					<f:converter converterId="userConverter"/>
				</h:outputText>
						<h:outputText value="创建时间"/>
				<h:outputText value="#{visitInfo.currentUserStory.createDate}">
					<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss"/>
				</h:outputText>
				<h:outputText value="优先级"/>
						<h:outputText value="#{visitInfo.currentUserStory.priority}">
				</h:outputText>
				<h:outputText value="UserStory 描述"></h:outputText>
				<h:outputText value="#{visitInfo.currentUserStory.userStoryDesc}"/>
			</h:panelGrid>
		</div>
		
		
		<ajax:repeat value="#{userStoryBean.childUserStory}" var="userStory">
			<div class="table" style="width:960px;">
				<div class="tableHead" style="width:960px;"><h:outputText value="#{userStory.createDate}"></h:outputText></div>
			<h:panelGrid columns="2" border="0">
					<h:outputText value="#{msg.UserStoryName}"></h:outputText>
					<h:outputText value="#{userStory.userStoryName}"></h:outputText>
					<h:outputText value="#{msg.Creator}"></h:outputText>
					<h:outputText value="#{userStory.creator}">
						<f:converter converterId="userConverter"/>
					</h:outputText>
					<h:outputText value="#{msg.Priority}"></h:outputText>
					<h:outputText value="#{userStory.priority}">
					</h:outputText>
					<h:outputText value="#{msg.UserStoryDesc}"></h:outputText>
					<h:outputText value="#{userStory.userStoryDesc}"></h:outputText>
				</h:panelGrid>
				</div>
		</ajax:repeat>
		
		
	<div class="table" style="width:960px;">
	<div class="tableHead" style="width:960px;"><h:outputText value="#{msg.DeposeUserStory}"/></div>
	<h:form>
		<h:panelGrid border="0" columns="2" style="width:960px;">
			<h:outputText value="#{msg.UserStoryName}"></h:outputText>
			<h:inputText value="#{userStoryBean.userStory.userStoryName}" styleClass="inputText"></h:inputText>
			<h:outputText value="#{msg.Priority}"></h:outputText>
				<h:selectOneMenu valueChangeListener="#{userStoryBean.changePriority}">
					<f:selectItem itemLabel="Blocker" itemValue="0"></f:selectItem>
					<f:selectItem itemLabel="Critical" itemValue="1"></f:selectItem>
					<f:selectItem itemLabel="Major" itemValue="2"></f:selectItem>
					<f:selectItem itemLabel="Minor" itemValue="3"></f:selectItem>
					<f:selectItem itemLabel="Trivial" itemValue="4"></f:selectItem>
				</h:selectOneMenu>
			<h:outputText value="#{msg.UserStoryDesc}"></h:outputText>
			<h:inputTextarea value="#{userStoryBean.userStory.userStoryDesc}" styleClass="inputArea"></h:inputTextarea>
			<h:outputText value=""/>
			<h:panelGroup>
				<h:commandLink value="#{msg.ContinueToDepose}" actionListener="#{userStoryBean.continueToDepose}" styleClass="button"></h:commandLink>
				<h:commandLink value="#{msg.Finish}" action="#{userStoryBean.finish}" action="#{userStoryBean.finishDepose}" styleClass="button" style="margin-left:10px;">
					<f:param name="projectId" value="#{visitInfo.currentProject.projectId}"/>
				</h:commandLink>
			</h:panelGroup>
		</h:panelGrid>
	</h:form>
	</div>
</f:view>
</div>
</div>
</body>
</html>